# Contributor: Mari Hahn <mari.hahn@wwu.de>
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=tint2
pkgver=16.7
pkgrel=1
pkgdesc="tint2 is a simple unintrusive panel/taskbar"
url="https://gitlab.com/o9000/tint2"
arch="all !s390x !mips !mips64" # librsvg
license="GPL-2.0"
options="!check"
depends="imlib2 glib pango cairo libxcomposite libxdamage
	libxinerama libxrandr gtk+"
makedepends="cmake imlib2-dev glib-dev pango-dev cairo-dev
	libxcomposite-dev libxdamage-dev libxinerama-dev libxrandr-dev
	gtk+-dev librsvg-dev startup-notification-dev linux-headers"
subpackages="$pkgname-doc $pkgname-lang"
source="https://gitlab.com/o9000/tint2/-/archive/v$pkgver/tint2-v$pkgver.tar.bz2"
builddir="$srcdir/$pkgname-v$pkgver"

prepare() {
	mkdir -p build
}

build() {
	cd "$builddir"/build
	cmake \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_SYSCONFDIR=/etc \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
		-DCMAKE_C_FLAGS="$CFLAGS" \
		..
	make
}

package() {
	cd "$builddir"/build
	make DESTDIR="$pkgdir" install
}

sha512sums="92d3bb3b26fe356553b711727d86c46ab1530990e972791b10ddde57c7479ce983dda97bacb5dd37be1e846c767b00a0e36388271d5e6618552243c8e2a7fa43  tint2-v16.7.tar.bz2"
